package com.ninthgroup.service.Impl;

import com.ninthgroup.entity.Order;
import com.ninthgroup.mapper.OrderMapper;
import com.ninthgroup.service.OrderService;
import com.ninthgroup.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ：1452863884@qq.com rcg
 * @date ：Created in 2022/10/27 15:33
 * @description：订单接口的实现类
 * @modified By：
 * @version:1.0
 */
@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    private OrderMapper orderMapper;
    @Override
    public Result SelectAll() {

        List<Order> orders = orderMapper.selectAll();
        return new Result(200,"订单成功",orders);
    }

    @Override
    public Result SelectOne(String mIdcard, String mTelephone) {

        List<Order> orders = orderMapper.selectByIdAndPhone(mIdcard, mTelephone);

        return new Result(200,"成功",orders);
    }
}